# Makefile for Kito Project
# 项目构建配置

# 编译器设置
CC = rustc
CARGO = cargo

# 目标设置
TARGET = target/debug/kito
RELEASE_TARGET = target/release/kito

# 默认任务：调试构建
all: debug

# 调试构建
debug:
	$(CARGO) bootimage 
	cp target/kito/debug/bootimage-kito.bin build/kito.bin


# 发布构建
release:
	$(CARGO) bootimage --release

# 运行调试版本
run: debug
	@qemu-system-x86_64 -drive format=raw,file=build/kito.bin 

# 运行发布版本
run-release: release
	$(CARGO) bootimage --release

# 清理构建产物
clean:
	$(CARGO) clean

# 检查代码格式

.PHONY: all debug release run run-release clean fmt check test